package com.hanxiaozhang.system.dao;

import com.hanxiaozhang.system.dto.RoleDTO;
import com.hanxiaozhang.system.entity.RoleEntity;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 角色表
 *
 * @author hanxiaozhang
 * @email hanxiaozhang2018@sina.com
 * @date 2021-03-31
 */
@Mapper
public interface RoleDao {

	RoleDTO get(Long roleId);
	
	List<RoleDTO> list(Map<String, Object> map);

	int count(Map<String, Object> map);

	int save(RoleEntity role);
	
	int update(RoleEntity role);
	
	int remove(Long roleId);

	int batchRemove(Long[] roleIds);


	RoleDTO getByRoleName(String roleName);


	RoleDTO getByRoleNameAndNoRoleId(@Param("roleName") String roleName,@Param("roleId") Long roleId);

	List<RoleEntity> listByRoleIds(@Param("roleIds")  List<Long> roleIds);

}
